package se.webbzon.boltzmann.game.object.trigger;

import se.webbzon.boltzmann.environment.AbstractEnvironment;
import se.webbzon.boltzmann.environment.EnvironmentInflator;
import se.webbzon.boltzmann.game.sequence.builder.SequenceRowInflatorGroup;
import se.webbzon.oschi01.worldeditor.WorldObjectDeflation;
import se.webbzon.oschi01.worldobject.WorldObject;

public class SequenceTriggerInflator extends EnvironmentInflator {
	
	// The sequence row inflator group associated with this
	// trigger inflator
	private final SequenceRowInflatorGroup inflatorGroup;

	/*============================================================
	Constructors
	============================================================*/
	
	public SequenceTriggerInflator(	AbstractEnvironment env,
							SequenceRowInflatorGroup inflatorGroup) {
		super(env, SequenceTrigger.worldObjectName);
		this.inflatorGroup = inflatorGroup;
	}
	
	/*============================================================
	Public Methods
	============================================================*/

	@Override public WorldObject makeWorldObject(WorldObjectDeflation deflation) {
		return ((SequenceTriggerDeflation) deflation).makeTrigger(getEnvironment(), inflatorGroup);
	}

	@Override public WorldObjectDeflation makeDeflation(int deflationProperties,
														WorldObject[] dependencies) {
		return new SequenceTriggerDeflation(deflationProperties,dependencies);
	}

}
